package com.arcvideo.acsconnect.ui.screen;

import android.view.View;
import android.widget.RelativeLayout;

/**
 * @author shenmengchao
 * @version 1.0.0
 * @date 2018/10/10
 * @description
 */

public class OneScreen extends Screen {

    @Override
    public void refresh() {
        RelativeLayout.LayoutParams lp1 = (RelativeLayout.LayoutParams) surfaceViewList.get(0).getLayoutParams();
        lp1.width = windowWidth;
        lp1.height = windowHeight;
        lp1.topMargin = 0;
        lp1.leftMargin = 0;
        for (int i = 0; i < surfaceViewList.size(); i++) {
            if (i == 0) {
                surfaceViewList.get(i).setVisibility(View.VISIBLE);
                surfaceViewList.get(i).setLayoutParams(lp1);
            } else {
                surfaceViewList.get(i).setVisibility(View.GONE);
            }
        }
        for (int i = 0; i < userHeadInfoLayoutList.size(); i++) {
            if (i == 0) {
                userHeadInfoLayoutList.get(i).setVisibility(View.VISIBLE);
                userHeadInfoLayoutList.get(i).setLayoutParams(lp1);
            } else {
                userHeadInfoLayoutList.get(i).setVisibility(View.GONE);
            }
        }
    }
}
